<%@ Page Language="C#" MasterPageFile="~/ContosoHealth.master" AutoEventWireup="true"
    CodeFile="~/AddPatient.aspx.cs" Inherits="AddPatient" Title="Contoso Health - Add Patient" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContentPlaceHolder" runat="Server">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
        <tr>
            <td style="width: 5px">
            </td>
            <td style="height: 5px">
                &nbsp;
            </td>
            <td>
            </td>
        </tr>
        <tr>
            <td style="width: 10px; height: 284px;">
            </td>
            <td align="center" valign="top" style="height: 284px">
                <table class="MainOuterTable" border="0" cellpadding="0" cellspacing="0">
                    <tr>
                        <td align="center" class="Margin" style="height: 100%; width: 100%;" valign="middle">
                            <div>
                                <table border="0" cellpadding="0" cellspacing="0">
                                    <tr>
                                        <td class="LabelText" colspan="7" nowrap="nowrap" valign="top">
                                            <asp:Label ID="LabelErrorMessage" runat="server" CssClass="ErrorMessage"></asp:Label>&nbsp;</td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr style="color: #ff0000">
                                        <td class="LabelText" align="left" valign="middle">
                                            Name<span class="Mandatory">*</span></td>
                                        <td align="left" style="width: 15px; height: 20px">
                                        </td>
                                        <td style="height: 20px; width: 359px;" align="left">
                                            <asp:TextBox ID="TextBoxFirstName" runat="server" CssClass="TextBox" MaxLength="100"
                                                Width="125px" TabIndex="1"></asp:TextBox>
                                            <asp:TextBox ID="TextBoxMiddleName" runat="server" CssClass="TextBox" MaxLength="100"
                                                Width="50px" TabIndex="2"></asp:TextBox>
                                            <asp:TextBox ID="TextBoxLastName" runat="server" CssClass="TextBox" MaxLength="100"
                                                Width="125px" TabIndex="3"></asp:TextBox>&nbsp;
                                        </td>
                                        <td align="left">
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorFirstName" runat="server" ControlToValidate="TextBoxFirstName"
                                                Display="Dynamic" ErrorMessage="Please provide a value for First name." SetFocusOnError="true"></asp:RequiredFieldValidator>
                                            <br />
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorLastName" runat="server" ControlToValidate="TextBoxLastName"
                                                Display="Dynamic" ErrorMessage="Please provide a value for last name." SetFocusOnError="true"></asp:RequiredFieldValidator>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td align="left" style="width: 15px; height: 20px">
                                        </td>
                                        <td style="height: 10px; width: 359px;" align="left">
                                        </td>
                                        <td style="width: 100px; height: 20px">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="LabelText"  align="left" valign="middle">
                                            Identification question<span class="Mandatory">*</span></td>
                                        <td align="left" style="width: 15px; height: 20px">
                                        </td>
                                        <td style="height: 20px; width: 359px;" align="left">
                                            <asp:TextBox ID="TextBoxIDQuestion" runat="server" CssClass="TextBox" MaxLength="200"
                                                Width="319px" TabIndex="4"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorQuestion" runat="server" ControlToValidate="TextBoxIDQuestion"
                                                Display="Dynamic" ErrorMessage="Please provide a value for Identification question."
                                                SetFocusOnError="true"></asp:RequiredFieldValidator></td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                        </td>
                                        <td align="left" style="width: 15px; height: 20px">
                                        </td>
                                        <td align="left" style="width: 359px">
                                        </td>
                                        <td style="width: 100px; height: 20px">
                                        </td>
                                        <td style="height: 10px">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="LabelText" align="left" valign="middle">
                                            Identification answer<span class="Mandatory">*</span></td>
                                        <td align="left" style="width: 15px; height: 20px">
                                        </td>
                                        <td style="height: 20px; width: 359px;" align="left">
                                            <asp:TextBox ID="TextBoxIDAnswer" runat="server" CssClass="TextBox" MaxLength="200"
                                                Width="319px" TabIndex="5"></asp:TextBox>
                                        </td>
                                        <td>
                                            <asp:RequiredFieldValidator ID="RequiredFieldValidatorAnswer" runat="server" ControlToValidate="TextBoxIDAnswer"
                                                Display="Dynamic" ErrorMessage="Please provide a value for Identification answer."
                                                SetFocusOnError="true"></asp:RequiredFieldValidator></td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="LabelText" nowrap="nowrap">
                                        </td>
                                        <td style="height: 10px">
                                        </td>
                                        <td style="height: 10px; width: 359px;">
                                        </td>
                                        <td style="width: 100px; height: 10px">
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td align="left" class="LabelText" colspan="3" nowrap="nowrap">
                                            <table border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td align="Left" class="Mandatory" style="height: 15px">
                                                        Fields marked with * are mandatory
                                                    </td>
                                                    <td>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td align="left" class="LabelText" colspan="1" nowrap="nowrap" style="width: 100px;">
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="LabelText" nowrap="nowrap">
                                        </td>
                                        <td style="height: 10px">
                                        </td>
                                        <td style="height: 10px; width: 359px;">
                                        </td>
                                        <td style="width: 100px; height: 10px">
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3">
                                            <table border="0" cellpadding="0" cellspacing="0">
                                                <tr>
                                                    <td align="right" style="height: 18px">
                                                        <asp:Button ID="ButtonSave" CssClass="Button" Text="Add and Submit to HealthVault"
                                                            runat="server" OnClick="ButtonSave_Click" TabIndex="6" ToolTip="Create patient Identification Code" />
                                                    </td>
                                                    <td style="width: 30px; height: 18px;">
                                                    </td>
                                                    <td style="height: 18px">
                                                        <asp:Button ID="ButtonCancel" runat="server" CssClass="Button" OnClick="ButtonCancel_Click"
                                                            TabIndex="6" Text="Cancel" CausesValidation="false" ToolTip="Return to home page" />
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                        <td colspan="1">
                                        </td>
                                        <td>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="3" style="height: 15px">
                                            &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
                                        </td>
                                        <td colspan="1" style="height: 15px">
                                        </td>
                                        <td style="height: 15px">
                                        </td>
                                    </tr>
                                </table>
                            </div>
                            &nbsp;
                        </td>
                    </tr>
                </table>
                &nbsp;</td>
            <td style="height: 284px">
            </td>
        </tr>
    </table>

    <script language="javascript" type="text/javascript">    
    function CheckSpecialCharacter(Chars)
    {
        var str = Chars.split(",");
        for(var i=0;i<str.length;i++)
        {     
         if(String.fromCharCode(event.keyCode) == str[i]) 
         {
           event.returnValue=false;
         }
        }
    }
    </script>

</asp:Content>
